from onnxsim import simplify
import onnx
input_path=r"C:\Users\41934\Desktop\dbnet c++\mbv3=96.onnx"
output_path=r"C:\Users\41934\Desktop\dbnet c++\dbnet.onnx"
onnx_model = onnx.load(input_path)  # load onnx model
model_simp, check = simplify(onnx_model,dynamic_input_shape=True,input_shapes={'input0': [1, 3, 32, 280]})
assert check, "Simplified ONNX model could not be validated"
onnx.save(model_simp, output_path)
print('finished exporting onnx')
